<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>day01</title>
    </head>
    <body>
      <h1 id="word">Hello World</h1> 
      <div>
        <input type="button" value="变为红色" id="red">
        <input type="button" value="复原" id="return">
      </div>
    <script type="text/javascript">
        document.getElementById("red").addEventListener("click",function(){
            document.getElementById("word").style.color="red";
        });
        document.getElementById("return").addEventListener("click",function(){
            document.getElementById("word").style.color="black";
        });
    </script>
    </body>
</html>